import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    areaList: {
      label: '上海市',
      value: 'AREA|dbf46d32-7e76-1196'
    },
    hisList: []
  },
  mutations: {
    area(state, payload) {
      state.areaList = payload
      console.log(payload);
    },
    
    setHis(state, payload) {
      state.hisList.push(payload)
      sessionStorage.setItem('History',JSON.stringify( state.hisList))
    }
  },
  actions: {
  },
  modules: {
  }
})
